package com.cdtye.itps.cms.controller.defect;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cdtye.common.webcore.web.AjaxJson;
import com.cdtye.itps.cms.dao.defect.entity.JcwProblemDefectLevel;
import com.cdtye.itps.cms.dao.defect.vo.JcwProblemDefectLevelVo;
import com.cdtye.itps.cms.service.defect.JcwProblemDefectLevelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 缺陷等级 前端控制器
 * @author Jchen
 * @date 2021-07-08
 */
@Api(tags="缺陷等级 接口")
@RestController
@RequestMapping("/defectLevel")
public class JcwProblemDefectLevelController {

    @Autowired
    private JcwProblemDefectLevelService modelService;

    @ApiOperation("获取缺陷等级")
    @GetMapping("/getList")
    public AjaxJson list(JcwProblemDefectLevelVo vo)
    {
        List<Map<String,Object>> list = modelService.getList(vo);
        return AjaxJson.success(list);
    }

    @ApiOperation("获取缺陷等级")
    @GetMapping("/pageList")
    public AjaxJson pageList(JcwProblemDefectLevelVo vo)
    {
        IPage<Map<String,Object>> list = modelService.pageList(vo);
        return AjaxJson.success(list);
    }
}
